<div class="context-menus" id="canvas-menus" [ngStyle]="contextmenu">
  <div>
    <a [class.disabled]="!selNodes" (click)="onTop()">
      置顶
    </a>
  </div>
  <div>
    <a [class.disabled]="!selNodes" (click)="onBottom()">
      置底
    </a>
  </div>
  <div class="line"></div>
  <div
    *ngIf="!selNodes || selNodes.length > 1 || selNodes[0].name !== 'combine'"
  >
    <a
      [class.disabled]="!selNodes || selNodes.length < 2"
      (click)="onCombine()"
    >
      组合
    </a>
    <div>
      <a
        [class.disabled]="!selNodes || selNodes.length < 2"
        (click)="onCombine(true)"
      >
        包含
      </a>
    </div>
  </div>
  <div
    *ngIf="selNodes && selNodes.length === 1 && selNodes[0].name === 'combine'"
  >
    <a (click)="onUncombine()">
      取消组合/包含
    </a>
  </div>
  <div>
    <a [class.disabled]="!selNodes && !selected" (click)="onLock()">
      {{ locked ? '解锁' : '锁定' }}
    </a>
  </div>
  <div class="line"></div>
  <div>
    <a [class.disabled]="!selNodes" (click)="onDel()">
      删除
    </a>
  </div>
  <div class="line"></div>
  <div>
    <a (click)="canvas.undo()" class="flex">
      <span class="full">撤消</span>
      <span class="ml50">Ctrl + Z</span>
    </a>
  </div>
  <div>
    <a (click)="canvas.redo()">
      恢复
      <span class="ml50">Ctrl + Shift+ Z</span>
    </a>
  </div>
  <div class="line"></div>
  <div>
    <a (click)="canvas.cut()" class="flex">
      <span class="full">剪切</span>
      <span class="ml50">Ctrl + X</span>
    </a>
  </div>
  <div>
    <a (click)="canvas.copy()" class="flex">
      <span class="full">复制</span>
      <span class="ml50">Ctrl + C</span>
    </a>
  </div>
  <div>
    <a (click)="canvas.parse()" class="flex">
      <span class="full">粘贴</span>
      <span class="ml50">Ctrl + V</span>
    </a>
  </div>
  <div class="line"></div>
  <div>
    <a
      [class.disabled]="!selNodes || selNodes.length > 1 || !selNodes[0].image"
      (click)="onCopyImage()"
      class="flex"
    >
      <span class="full">复制节点图片地址</span>
    </a>
  </div>
</div>
